package com.gamehall.core;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.gamehall.cmd.UserCommand.PaiJiuCardCmd;

public class PaiJiuCardGroup extends CardGroup{

	public PaiJiuCardGroup(Card cardOne, Card cardTwo) {
		super(cardOne, cardTwo);
	}

	
	public  static List<PaiJiuCardCmd> getCardsToPaiJiuCard(List<Card> cards){
		if(cards == null || cards.isEmpty()){
			return Collections.emptyList();
		}
		
		List<PaiJiuCardCmd> result = new ArrayList<PaiJiuCardCmd>();
		for(Card c:cards){
			if(c instanceof PaiJiuCard){
				result.add(((PaiJiuCard)c).toCmd());
			}else{
				continue;
			}
		}
		return result;
		
	}
}
